import {ref} from "vue";
import {defineStore} from "pinia";

export const roleStore=defineStore('roleStore', () => {
    const userModel=ref({
        roleId:'',
        roleName:'',
        posCode:'',
        posName:'',
        roleState:'',
        departName:''
    })
    return {userModel},
        {
            persist:{
                storage:sessionStorage,//把数据存入SessionStorage
                paths:['userModel']
            }

        }
})